package org.ww.product.test;

import lombok.extern.slf4j.Slf4j;
import org.ww.product.entity.BrandEntity;

@Slf4j
public class Example {

    public BrandEntity privateCatch(String param) {
        try {
            return getBrand(param);
        } catch (RuntimeException e) {
            log.info("restTemplateTest error");
        }
        return null;
    }

    private BrandEntity getBrand(String param) {
        if(param.equals("1")){
            BrandEntity brandEntity = new BrandEntity();
            brandEntity.setBrandId(1L);
            return brandEntity;
        }else{
            return new BrandEntity();
        }
    }
}